package com.frkj.order.util;

import com.alibaba.fastjson.JSON;
import org.joda.time.DateTime;

import java.text.DecimalFormat;
import java.util.Arrays;

/**
 * Created by Administrator on 2016/6/28.
 */
public class Tester {
    public static void main(String[] args) {
        String[] ids = new String[]{"1", "2", "3"};
        String str = JSON.toJSONString(ids);
        System.out.println(str);

        //List<String> ids2 = JSON.parseObject(str, new TypeReference<List<String>>() {});
        String[] ids2 = JSON.parseObject(str, String[].class);
        System.out.println(Arrays.toString(ids2));

        DecimalFormat df = new DecimalFormat("0000");
        System.out.println(df.format(13));

        DateTime d1 = new DateTime();
        System.out.println(d1);
        System.out.println(d1.plusMonths(-1));
    }


}
